package com.lits.file.vo;

/**
 * 公共返回信息
 * 
 * @author Lizm
 */
public class ComResp<T> {
	/**
	 * 消息码:code 1表示成功
	 */
	private int c;

	/** 消息内容:message */
	private String m;

	/** 返回数据:data */
	private T d;

	public ComResp() {
	}

	public ComResp(int c, String m, T d) {
		super();
		this.c = c;
		this.m = m;
		this.d = d;
	}

	public ComResp(T d) {
		super();
		this.d = d;
		this.c = 1;
		this.m = "";
	}

	public ComResp(int c, String m) {
		super();
		this.c = c;
		this.m = m;
		this.d = null;
	}

	public int getC() {
		return c;
	}

	public void setC(int c) {
		if (c < 1) {
			throw new IllegalArgumentException("code为不能小于1的整数");
		}
		this.c = c;
	}

	public String getM() {
		return m;
	}

	public void setM(String m) {
		this.m = m;
	}

	public T getD() {
		return d;
	}

	public void setD(T d) {
		this.d = d;
	}

}
